package com.gh.singleton.Seriable;

import java.io.Serializable;

public class Seriable implements Serializable{
    public final static Seriable INSTANCE = new Seriable();
    private Seriable(){

    }

    public static Seriable getInstance() {
        return INSTANCE;
    }

    //若不重写readResolve方法，则序列化会破坏单例
    private Object readResolve() {
        return INSTANCE;
    }
}
